package boot.controller;

import boot.entity.Teacher;
import boot.service.SomeServiceImpl;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author HLF
 * @date 2022/4/10 22:19
 */
@RestController
public class AspectjController {
    @Resource
    private SomeServiceImpl service;

    @GetMapping("/some")
    public void dome() {
        service.doSome("张三", 18);
    }

    @GetMapping("/other")
    public String other() {
        return service.doOther("王五", 21);
    }

    @GetMapping("/teacher")
    public Teacher teacher() {
        return service.updateTeacher(new Teacher("李四", 31));
    }
}
